package com.itheima.io.outputstream.demo03;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.IllegalFormatCodePointException;

public class OutputStreamDemo03 {

    public static void main(String[] args) {

        OutputStream outputStream = null;
        try {
            outputStream = new FileOutputStream("itheima-io-outputstream\\c.text");
            outputStream.write("yunshenbuzhichu".getBytes());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (outputStream != null) {//防止出现空指针异常
                try {
                    outputStream.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }


    }
}
